import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
//ui
import elementUi from "element-ui";
//引入rsa加解密的js库
// import JSEncrypt from "jsencrypt";
// Vue.use(JSEncrypt);
import "element-ui/lib/theme-chalk/index.css";
import debounce from '../src/mixins/debounce';
import scroll from 'vue-seamless-scroll';

// 防抖
Vue.mixin(debounce);
// 滚动
Vue.use(scroll);
Vue.use(elementUi);
//jquery
import $ from "jquery";
//请求
import api from "./request/index";
Vue.use(api);
import { VueJsonp } from "vue-jsonp";
Vue.use(VueJsonp);
//引入阿里矢量图标库
import "./assets/font/iconfont.css";
//公共样式
import "./assets/style/public.less";
//样式初始化
import "./assets/style/reset.less";
//项目公共组件
import components from "./components/index";
Vue.use(components);
//分块上传组件
import uploader from "vue-simple-uploader";
Vue.use(uploader);
//打印
import print from "./assets/js/print.js";
Vue.use(print);
//按需引入echarts
import echarts from "./assets/js/echarts";
Vue.prototype.$echarts = echarts;

Vue.use(echarts);
//添加公共指令
import "./utils/directive";

//引用公共方法
Vue.prototype.$utils = require("./utils/index.js").default;
//时间函数
import elementDate from "./assets/js/elementDate.js";
Vue.prototype.elementDate = elementDate;
//echart自定义样式
import echartCommon from "./assets/js/echartCommon.js";
Vue.prototype.echartCommon = echartCommon;

Vue.config.productionTip = false;
import "@/permission"; // permission control
if (module.hot) {
  module.hot.accept();
}
new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
